package tr.edu.yildiz.ce.dap.apm.commands;

import tr.edu.yildiz.ce.dap.apm.commands.basic.BasicReply;
import tr.edu.yildiz.ce.dap.appagent.model.DapMessage;

public class ListCommandReply extends BasicReply{
	
	@Override
	public DapMessage reply(DapMessage input) {
		DapMessage dapMessage = new DapMessage();
		if (input.getCriteriaList() != null)
			dapMessage.setAppList(appService.list(input.getCriteriaList()));
		else 
			dapMessage.setAppList(appService.listAll());
		return dapMessage;
	}

}
